package com.baizhi.feign.rollback;

import com.baizhi.entity.StudentTag;
import com.baizhi.feign.FeignTag;
import com.baizhi.po.TagsPO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

@Component
public class TagRollBack implements FeignTag {

    private static final Logger log = LoggerFactory.getLogger(TagRollBack.class);

    @Override
    public ArrayList<Long> queryAll(Long sid) {
        ArrayList<Long> longs = new ArrayList<>();
        Long i = -1L;
        longs.add(i);
        return longs;
    }

    @Override
    public TagsPO queryAlls(Long id) {
        TagsPO tagsPO = new TagsPO();
        tagsPO.setId(id);
        tagsPO.setName("服务不可用");
        return tagsPO;
    }

    @Override
    public void addTags(StudentTag studentTag) {
        log.info("studentTag {}", studentTag);
        return;
    }
}
